qtvcp probe help: fix broken/blurry images and typos#4088
Conversation
The versaprobe (pages 4-7) and basic_probe (pages 7-8) help pages referenced their images through an absolute path baked into a developer's home directory (/home/chris/emc/share/qtvcp/images/...), which exists only on the original author's machine, so the images rendered as broken-file icons everywhere else. basic_probe page 6 also referenced its image without the .png extension. Point them at the existing assets via the relative "../images/" form the help-dialog loader rewrites to the runtime install path, matching the other help pages. Signed-off-by: Peter Stolz <peter@detesia.com>
The help dialogs (QTextEdit) upscale/downscale images with no smoothing, so the diagrams looked soft or pixelated: most pages forced width=500 onto images of widely varying native sizes, and the versaprobe diagrams even pointed at tiny 300px thumbnails. Ship the diagrams pre-scaled to their 500px display width (Lanczos) in new probe_icons_help/ and basic_probe_help/ dirs and reference those, so Qt draws them 1:1 with no rescaling. Generalise the help-dialog image path rewrite from "../images/probe_icons/" to "../images/" so any image subdir resolves. Also centre the page-4 versaprobe image to match the other pages, and drop the width override on basic_probe page 4 (480px native, it was being upscaled). Signed-off-by: Peter Stolz <peter@detesia.com>
Correct several typos in the versaprobe and basic_probe help pages:
versa pg3: "distance too large" -> "distance is too large"
versa pg4: "farther away then" -> "farther away than"
"in Z .If the" -> "in Z. If the"
"clearence" / "lowring" -> "clearance" / "lowering"
versa pg8: "will automatically rotates"-> "automatically rotate"
garbled "Press only! corresponding to this position
button." -> "Press only the button corresponding to this
position." (matching the wording already on page 1)
basic pg7: capitalise sentence start
basic pg8: "imprial" -> "imperial", "These distance" -> "distances",
"it's start position" -> "its", and rename the stray
"EXTRA CLEARANCE" references to "EXTRA DEPTH" (the actual
field name used elsewhere on the page).
Signed-off-by: Peter Stolz <peter@detesia.com>
d6e368b to
a2ea10d
Compare
|
Wouldn't it be better to replace the images, that are no screen-shots, to be SVG images? Or can't QtTextDocument render SVG images linked in html |
The earlier "render help diagrams crisp at display size" change shipped the help diagrams pre-scaled to 500px in new probe_icons_help/ and basic_probe_help/ dirs to dodge QTextEdit's nearest-neighbour image scaling. That duplicated assets and orphaned the originals. Scale in the help-dialog loader instead: each raster <img> is pre-scaled to its requested width/height with a smooth (SmoothTransformation) filter and registered as a document resource, so Qt draws it 1:1 with no nearest-neighbour rescaling. SVG images are skipped so Qt's vector renderer can draw them crisply at any size. Point the versaprobe diagram pages back at the existing higher-resolution probe_icons_1024x768/ sources and the basic pages at their originals under widgets/basic_probe_help/, and drop the bundled pre-scaled copies. No new assets are added. Signed-off-by: Peter Stolz <peter@detesia.com>
|
Good question — I looked into it properly. The snag is that the So instead of bundling resized PNG copies, I switched the help-dialog loader to pre-scale each raster image to its display size with a smooth filter and register it as a document resource, so Qt draws it 1:1 rather than nearest-neighbour (which was the cause of the jaggies). SVG |
|
For scope, while it's fresh: because this fix lives in the One thing I noticed in there: the two |
|
Thanks for work. More pull requests will be happily welcomed. |
Fixes the bundled help pages for the VersaProbe and Basic Probe dialogs in qtvcp. Three commits:
1. Fix broken image paths
The versaprobe (pages 4-7) and basic_probe (pages 7-8) help pages referenced their images through an absolute path baked into a developer's home directory (
/home/chris/emc/share/qtvcp/images/...), so they rendered as broken-file icons on every install. basic_probe page 6 also omitted the.pngextension. Pointed them at the existing assets via the relative../images/form the loader rewrites.2. Render help diagrams crisp at display size
The help dialogs (
QTextEdit) rescale images with no smoothing, so the diagrams looked soft or pixelated: most pages forcedwidth=500onto images of widely varying native sizes, and the versaprobe diagrams pointed at tiny 300px thumbnails. Shipped the diagrams pre-scaled to their 500px display width (Lanczos) in newprobe_icons_help/andbasic_probe_help/dirs and reference those, so Qt draws them 1:1 with no rescaling. Generalised the loader image-path rewrite from../images/probe_icons/to../images/so any image subdir resolves. Also centred the versaprobe page-4 image to match the other pages and dropped the width override on basic_probe page 4 (480px native, was being upscaled).3. Fix typos in help text
Corrected several typos in the help text (
then->than,imprial->imperial,clearence->clearance, a missing word, a garbled sentence rephrased to match the wording already used on page 1, and the strayEXTRA CLEARANCEreferences renamed to the actual field nameEXTRA DEPTH).No functional/behaviour changes - HTML, help images, and one loader string.